import request from '@/utils/request'

// 一体杆管理页面渲染
export const getListIeceManage = (params) => {
  return request.get('/pole/info/list', { params })
}

// 添加一体杆
export const addIeceMange = (data) => {
  // return request.post('/pole/info', data)
  return request({
    url: '/pole/info',
    method: 'post',
    data: {
      poleName: data.poleName,
      poleNumber: data.poleNumber,
      poleIp: data.poleIp,
      poleType: data.poleType,
      areaId: data.areaId
    }
  })
}

// 获取关联区域下拉列表
export const getListAreaAPI = () => {
  return request.get('/parking/area/dropList')
}

// 编辑
export const editorIeceAPI = (data) => {
  return request.put('/pole/info', data)
}

// 删除
export const delIeceAPI = (ids) => {
  return request.delete(`/pole/info/${ids}`)
}
